package edu.gdkm.mapper;

import edu.gdkm.controller.request.BaseRequest;
import edu.gdkm.controller.request.UserPageRequest;
import edu.gdkm.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface UserMapper {
//    @Select("select * from user ")
    List<User> list();

    List<User> listByCondition(BaseRequest baseRequest);

    void save(User user);

    /**
     * 通过id获取用户数据(修改用户)
     * @return
     */
    User getById(Integer id);

    /**
     * 修改用户 通过id
     * @param user
     * @return
     */
    void updateById(User user);

    /**
     * 删除用户
     * @param id
     */
    void deleteById(Integer id);
}
